﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

// std headers
#include <string>
#include <cstdint>

// custom headers
#include "GcsTools.h"


namespace gmepgcs
{
    class GCS_TOOLS_EXPORTS PathUtils
    {
    public:
        static std::wstring GetComponentDownloadFilePath(
            const std::wstring componentId, 
            const std::wstring componentVersion, 
            const std::wstring componentName,
            const std::wstring suffix = L".gac");

        static std::wstring GetThumbnailDownloadFilePath(
            const std::wstring url, 
            const std::wstring suffix = L".png");

     

        static std::wstring GetAppDataLocalAppFolderPath();

    public:
        static bool EnsureFolderExists(const std::wstring &folderFullPath);
        
    private:
        static std::wstring GetAppDataLocalFolderPath();
        static std::wstring GetThumbnailCacheFolderPath();
        static std::wstring GetComponentEditingFolderPath();
        static std::wstring GetComponentCacheFolderPath();

    private:
        static std::wstring s_appDataLocalFolderPath;
        static std::wstring s_appDataLocalAppFolderPath;
        static std::wstring s_componentCacheFolderPath;
        static std::wstring s_thumbnailCacheFolderPath;
        static std::wstring s_componentEditingFolderPath;
    };
}